1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.swt.custom; 15 16 class SashFormData { 17 18 long weight; 19 getName()20String getName () { 21 String string = getClass ().getName (); 22 int index = string.lastIndexOf ('.'); 23 if (index == -1) return string; 24 return string.substring (index + 1, string.length ()); 25 } 26 27 /** 28 * Returns a string containing a concise, human-readable 29 * description of the receiver. 30 * 31 * @return a string representation of the event 32 */ 33 @Override toString()34public String toString () { 35 return getName()+" {weight="+weight+"}"; //$NON-NLS-2$ 36 } 37 } 38